Skip to content

Conversation

jshigetomi
Copy link
Contributor

@jshigetomi jshigetomi commented Oct 8, 2024

PR Summary

fixes: #1715

This pull request introduces changes to the Compress-PSResource functionality, including updates to the PublishHelper.cs file and the corresponding tests in CompressPSResource.Tests.ps1. The primary focus is on enhancing the compression process and ensuring it works correctly with both absolute and relative paths.

Enhancements to Compress-PSResource functionality:

  • src/code/PublishHelper.cs: Added logic to set the outputNupkgDir to DestinationPath when the caller cmdlet is CompressPSResource. ([src/code/PublishHelper.csR297-R301](https://github.com/PowerShell/PSResourceGet/pull/1719/files#diff-de173e5cd669c3f87b931f1b38ebaa7633861e9c809176f0cec1735585d68549R297-R301))

Updates to tests:

  • test/PublishPSResourceTests/CompressPSResource.Tests.ps1: Added a new test case to verify the compression of a script into a .nupkg file. ([test/PublishPSResourceTests/CompressPSResource.Tests.ps1R194-R244](https://github.com/PowerShell/PSResourceGet/pull/1719/files#diff-8214d34f8b6d7fd40d95dab82c9c569dd62919c12ac16e599af4255985a15cb7R194-R244))
  • test/PublishPSResourceTests/CompressPSResource.Tests.ps1: Added a test case to ensure that Compress-PSResource works correctly when using relative paths for the -DestinationPath parameter. ([test/PublishPSResourceTests/CompressPSResource.Tests.ps1R194-R244](https://github.com/PowerShell/PSResourceGet/pull/1719/files#diff-8214d34f8b6d7fd40d95dab82c9c569dd62919c12ac16e599af4255985a15cb7R194-R244))

PR Context

PR Checklist

@jshigetomi jshigetomi marked this pull request as ready for review October 8, 2024 16:38
@alerickson alerickson merged commit e83ff8d into PowerShell:master Oct 9, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compress-PSResource does not compress scripts

2 participants